﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:ribbon="clr-namespace:Microsoft.Windows.Controls.Ribbon;assembly=RibbonControlsLibrary">
    <Style TargetType="{x:Type Button}" x:Key="ButtonStyle">
        <Style.Resources>
            <SolidColorBrush x:Key="brush" Color="Yellow"/>
        </Style.Resources>
        <Setter Property="Height" Value="28"/>
        <Setter Property="Width"  Value="80"/>
        <Setter Property="Margin" Value="15,0,5,0"/>
        <Setter Property="FontSize" Value="12"/>
    </Style>

    <Style TargetType="{x:Type Button}" x:Key="DataRowButtonStyle">
        <Setter Property="Margin" Value="5,0,5,0"/>
    </Style>

    <Style TargetType="{x:Type DatePicker}" x:Key="DatePickerStyle">
        <Setter Property="Height" Value="25"/>
        <Setter Property="Width" Value="120"/>
        <Setter Property="Margin" Value="0,0,0,0"/>
        <Setter Property="HorizontalAlignment" Value="Left"/>
        <Setter Property="VerticalAlignment" Value="Center"/>
    </Style>
    <Style TargetType="{x:Type ComboBox}" x:Key="ComboBoxStyle">
        <Setter Property="Height" Value="25"/>
        <Setter Property="Width" Value="120"/>
        <Setter Property="Margin" Value="0,0,0,0"/>
        <Setter Property="HorizontalAlignment" Value="Left"/>
        <Setter Property="VerticalAlignment" Value="Center"/>
    </Style>
    <Style TargetType="{x:Type CheckBox}" x:Key="CheckBoxStyle">
        <Setter Property="Height" Value="25"/>
        <Setter Property="Margin" Value="5,0,5,0"/>
        <Setter Property="HorizontalAlignment" Value="Left"/>
        <Setter Property="VerticalAlignment" Value="Center"/>
    </Style>
    <Style TargetType="{x:Type Label}" x:Key="LabelStyle">
        <Setter Property="Height" Value="25"/>
        <Setter Property="Margin" Value="5,0,5,0"/>
        <Setter Property="HorizontalAlignment" Value="Right"/>
        <Setter Property="VerticalAlignment" Value="Center"/>
        <Setter Property="FontWeight" Value="Bold"></Setter>
    </Style>
    <Style TargetType="{x:Type PasswordBox}" x:Key="PasswordBoxStyle">
        <Setter Property="Height" Value="25"/>
        <Setter Property="Width" Value="120"/>
        <Setter Property="Margin" Value="0,0,0,0"/>
        <Setter Property="HorizontalAlignment" Value="Left"/>
        <Setter Property="VerticalAlignment" Value="Center"/>
    </Style>
    <Style TargetType="{x:Type TextBox}" x:Key="TextAreaStyle">
        <Setter Property="Height" Value="100"/>
        <Setter Property="Width" Value="300"/>
        <Setter Property="Margin" Value="0,0,0,0"/>
        <Setter Property="HorizontalAlignment" Value="Left"/>
        <Setter Property="VerticalAlignment" Value="Center"/>
        <Setter Property="TextWrapping" Value="Wrap"/>
        <Setter Property="AcceptsReturn" Value="True"/>
        <Setter Property="VerticalScrollBarVisibility" Value="Visible"/>
    </Style>

    <Style TargetType="{x:Type GroupBox}" x:Key="GroupBoxStyle">
        <Setter Property="BorderBrush" Value="Gray"></Setter>
        <Setter Property="BorderThickness" Value="1" ></Setter>
        <Setter Property="Margin" Value="5,0,5,0" ></Setter>
    </Style>

    <Style TargetType="{x:Type Border}" x:Key="BorderStyle">
        <Setter Property="BorderBrush" Value="{DynamicResource {x:Static SystemColors.InactiveCaptionBrushKey}}"></Setter>
        <Setter Property="BorderThickness" Value="2" ></Setter>
        <Setter Property="Margin" Value="5" ></Setter>
    </Style>

    <Style TargetType="{x:Type Border}" x:Key="MainBorderStyle">
        <Setter Property="BorderBrush" Value="{DynamicResource {x:Static SystemColors.InactiveCaptionBrushKey}}"></Setter>
        <Setter Property="BorderThickness" Value="2" ></Setter>
        <Setter Property="Margin" Value="5" ></Setter>
        <Setter Property="SnapsToDevicePixels" Value="True"></Setter>
        <Setter Property="CornerRadius" Value="5"></Setter>
        <!--<Setter Property="Effect">
            <Setter.Value>
                <DropShadowEffect Color="Black" BlurRadius="1" ShadowDepth="0" Opacity="1" />
            </Setter.Value>
        </Setter>-->
    </Style>

    <Style TargetType="{x:Type ScrollViewer}" x:Key="ScrollViewerStyle">
        <Setter Property="Background">
            <Setter.Value>
                <LinearGradientBrush EndPoint="0.5,1" MappingMode="RelativeToBoundingBox" StartPoint="0.5,0">
                    <GradientStop Color="#FFEFF6FD" Offset="1"/>
                    <GradientStop Color="#FFD9E5F2" Offset="0.009"/>
                    <GradientStop Color="#FFE3EDF7" Offset="0.043"/>
                </LinearGradientBrush>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="{x:Type Grid}" x:Key="GridStyle">
        <Setter Property="Background">
            <Setter.Value>
                <LinearGradientBrush EndPoint="0.5,1" MappingMode="RelativeToBoundingBox" StartPoint="0.5,0">
                    <GradientStop Color="#FFEFF6FD" Offset="1"/>
                    <GradientStop Color="#FFD9E5F2" Offset="0.009"/>
                    <GradientStop Color="#FFE3EDF7" Offset="0.043"/>
                </LinearGradientBrush>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="{x:Type Grid}" x:Key="BorderGridStyle">
        <Setter Property="Margin" Value="0,10,0,0" >

        </Setter>
    </Style>

    <Style TargetType="{x:Type TextBox}" x:Key="TextBoxStyle">
        <Setter Property="Height" Value="25"/>
        <Setter Property="Width" Value="120"/>
        <Setter Property="Margin" Value="0,0,0,0"/>
        <Setter Property="HorizontalAlignment" Value="Left"/>
        <Setter Property="VerticalAlignment" Value="Center"/>
        <!--<Setter Property="Background">
            <Setter.Value>
                <LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1" >
                    <GradientStop Color="Red" Offset="0" />
                    <GradientStop Color="#FFFFFF" Offset="1.0" />
                </LinearGradientBrush>
            </Setter.Value>
        </Setter>-->
    </Style>
    <Style TargetType="{x:Type TextBox}" x:Key="TextBox320">
        <Setter Property="Height" Value="25"/>
        <Setter Property="Width" Value="320"/>
        <Setter Property="Margin" Value="0,0,0,0"/>
        <Setter Property="HorizontalAlignment" Value="Left"/>
        <Setter Property="VerticalAlignment" Value="Center"/>
    </Style>
    <Style TargetType="{x:Type TextBox}" x:Key="TextBox200">
        <Setter Property="Height" Value="25"/>
        <Setter Property="Width" Value="200"/>
        <Setter Property="Margin" Value="0,0,0,0"/>
        <Setter Property="HorizontalAlignment" Value="Left"/>
        <Setter Property="VerticalAlignment" Value="Center"/>
    </Style>

    <Style TargetType="{x:Type Image}" x:Key="ImageStyle">
        <Setter Property="Height" Value="180"/>
        <Setter Property="Width" Value="230"/>
        <Setter Property="Margin" Value="0,0,0,0"/>
        <Setter Property="HorizontalAlignment" Value="Left"/>
        <Setter Property="VerticalAlignment" Value="Center"/>
        <Setter Property="Clip" Value=""/>
    </Style>


    <Style TargetType="{x:Type ribbon:RibbonTabHeader}" x:Key="TabHeaderStyle">
        <!--<Setter Property="Background">
            <Setter.Value>
                <LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1" >
                    <GradientStop Color="Red" Offset="0" />
                    <GradientStop Color="#FFFFFF" Offset="1.0" />
                </LinearGradientBrush>
            </Setter.Value>
        </Setter>-->
        <Setter Property="Height" Value="39"></Setter>
    </Style>
    <Style TargetType="{x:Type ribbon:RibbonTab}" x:Key="RibbonTabStyle">
        <!--<Setter Property="Background">
            <Setter.Value>
                <LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1" >
                    <GradientStop Color="Red" Offset="0" />
                    <GradientStop Color="#FFFFFF" Offset="1.0" />
                </LinearGradientBrush>
            </Setter.Value>
        </Setter>-->
        <Setter Property="Height" Value="80"></Setter>
    </Style>

    <!--DataGrid样式开始-->

    <!--行表头的颜色了-->
    <Style TargetType="DataGridRowHeader">
        <Setter Property="Width" Value="15"/>
        <Setter Property="Background">
            <Setter.Value>
                <LinearGradientBrush StartPoint="0,0" EndPoint="1,1">
                    <GradientStop Color="White" Offset="0"/>
                    <!--这里用到了两种颜色  也可以多层  这样就可以产生一种渐变的效果或立体感-->
                    <GradientStop Color="SkyBlue" Offset="1"/>
                    <!--<GradientStop Color="White" Offset="1"/>-->
                </LinearGradientBrush>
            </Setter.Value>
        </Setter>
        <Setter Property="Visibility" Value="Hidden"></Setter>
    </Style>
    <!--给整个表头添加颜色开始-->
    <Style TargetType="DataGridColumnHeader">
        <Setter Property="Background">
            <Setter.Value>
                <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
                    <GradientStop Color="White" Offset="0"/>
                    <GradientStop Color="LightBlue" Offset="0.5"/>
                    <GradientStop Color="White" Offset="1"/>
                </LinearGradientBrush>
            </Setter.Value>
        </Setter>
        <Setter Property="Foreground" Value="Black">
        </Setter>

        <Setter Property="FontSize" Value="12" />
        <Setter Property="FontWeight" Value="Bold"></Setter>
        <Setter Property="Height" Value="25"></Setter>
        <!--<Setter Property="HorizontalAlignment" Value="Center"></Setter>-->
        <!--<Setter Property="ext" Value="Normal"></Setter>-->

    </Style>


    <!--给行添加颜色+滑鼠事件-->
    <Style TargetType="DataGridRow">
        <Setter Property="Background" Value="White" />
        <Setter Property="Height" Value="23" ></Setter>
        <Setter Property="FontSize" Value="12" />

        <Style.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
                <!--当鼠标经过时 改变颜色-->
                <Setter Property="Background" Value="DarkCyan"/>
                <Setter Property="Foreground" Value="White"/>
            </Trigger>
        </Style.Triggers>

    </Style>
    <!--给单元格添加颜色-->
    <Style TargetType="DataGridCell">
        <Style.Triggers>
            <Trigger Property="IsSelected" Value="True">
                <!--单元格被选中时 改变颜色-->
                <!--<Setter Property="Background" Value="LightYellow"/>-->
                <Setter Property="Background" Value="RoyalBlue"/>
                <!--<Setter Property="Foreground" Value="Black"/>-->
                <Setter Property="Foreground" Value="White"/>
                <Setter Property="FontWeight" Value="Bold"/>
            </Trigger>
        </Style.Triggers>
    </Style>

    <Style TargetType="{x:Type DataGrid}"  x:Key="DataGridStyle">

        <Setter Property="RowHeaderStyle" Value="{DynamicResource DataGridRowHeader}"></Setter>
        <Setter Property="ColumnHeaderStyle" Value="{DynamicResource DataGridColumnHeader}"></Setter>
        <Setter Property="RowStyle" Value="{DynamicResource DataGridRow}"></Setter>
        <Setter Property="CellStyle" Value="{DynamicResource DataGridCell}"></Setter>
        <Setter Property="Margin" Value="15,0,0,0"></Setter>
    </Style>
    <!--DataGrid样式结束-->
    <Style  TargetType="{x:Type Image}"  x:Key="ButtonImageStyle">
        <Setter Property="Height" Value="16"></Setter>
        <Setter Property="Width" Value="16"></Setter>

    </Style>
    <Style  TargetType="{x:Type Label}"  x:Key="ButtonLabelStyle">
        <Setter Property="Height" Value="25"></Setter>

    </Style>
    <Style TargetType="{x:Type Label}"  x:Key="LabelStyle01">
        <Setter Property="Background" Value="White">
            <!--<Setter.Value>
                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                    <GradientStop Color="White" Offset="0.073"/>
                    <GradientStop Color="White" Offset="0.198"/>
                    <GradientStop Color="White" Offset="0.134"/>
                </LinearGradientBrush>
            </Setter.Value>-->
        </Setter>
        <Setter Property="BorderBrush" Value="LightGray">
            <!--<Setter.Value>
                <RadialGradientBrush>
                    <GradientStop Color="Black" Offset="0.073"/>
                    <GradientStop Color="#FFF5E5E5" Offset="0.974"/>
                </RadialGradientBrush>
            </Setter.Value>-->
        </Setter>
        <Setter Property="BorderThickness" Value="2"></Setter>
        <Setter Property="Height" Value="28"></Setter>
    </Style>
</ResourceDictionary>